import { ElMessage } from "element-plus";
import { EpPropMergeType } from "element-plus/es/utils";

export const messageCof = (
  message?: string,
  type?:
    | EpPropMergeType<
        StringConstructor,
        "success" | "warning" | "info" | "error",
        unknown
      >
    | undefined,
  grouping?: boolean
) => {
  return ElMessage({
    message,
    grouping: grouping ?? true,
    type: type,
  });
};
